package objects;

/**
 * @author web
 * 路由链路的组成节点，属性应包含编号，能力
 * 形成一个链表放在CarNodeStore中。
 */
public class LinkNode {
    int index;
    CarBase carBase;
    double ability;
    LinkNode pre;
    LinkNode next;

    public LinkNode(int index, CarBase carBase, double ability, LinkNode pre, LinkNode next) {
        this.index = index;
        this.carBase = carBase;
        this.ability = ability;
        this.pre = pre;
        this.next = next;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public CarBase getCarBase() {
        return carBase;
    }

    public void setCarBase(CarBase carBase) {
        this.carBase = carBase;
    }

    public double getAbility() {
        return ability;
    }

    public void setAbility(double ability) {
        this.ability = ability;
    }

    public LinkNode getPre() {
        return pre;
    }

    public void setPre(LinkNode pre) {
        this.pre = pre;
    }

    public LinkNode getNext() {
        return next;
    }

    public void setNext(LinkNode next) {
        this.next = next;
    }
}
